package com.supreme.studyserver.utils;

import com.supreme.studyserver.utils.corlogger.*;

public class ChainLoggerUtils {

    public static void main(String[] args) {
        AbstractLogger whiteLogger = new WhiteLogger(AbstractLogger.ZERO);
        AbstractLogger cyanLogger = new CyanLogger(AbstractLogger.ONE);
        AbstractLogger blueLogger = new BlueLogger(AbstractLogger.TWO);
        AbstractLogger greenLogger = new GreenLogger(AbstractLogger.THREE);
        AbstractLogger yellowLogger = new YellowLogger(AbstractLogger.FOUR);
        AbstractLogger redLogger = new RedLogger(AbstractLogger.FIVE);
        AbstractLogger blackLogger = new BlackLogger(AbstractLogger.SIX);

        cyanLogger.setNextLogger(whiteLogger);
        blueLogger.setNextLogger(cyanLogger);
        greenLogger.setNextLogger(blueLogger);
        yellowLogger.setNextLogger(greenLogger);
        redLogger.setNextLogger(yellowLogger);
        blackLogger.setNextLogger(redLogger);

        blackLogger.showLogger(AbstractLogger.SIX, "hello");
    }
}
